<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="/js/bootstrap/css/bootstrap.min.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/bootstrap/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/css/reset.css"/>
    <link rel="stylesheet" href="/css/news.css"/>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <script src="/js/common.js"></script>
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css">
    <script src="/js/plugins/dialog2/dialog.min.js"></script>
    <link rel="stylesheet" href="/css/reset.css" rel="stylesheet">
    <link rel="stylesheet" href="/css/index.css" rel="stylesheet">
    <title>我的收藏</title>
</head>
<script>
    $(function () {
        //获取当前用户信息
        var userStr = sessionStorage.getItem("user");
        var user = JSON.parse(userStr);
        var userId = user.id;
        $.get("/users/travelCollections", {userId: userId}, function (data) {
            console.log(data);
            $(".travels").renderValues({list: data}, {
                setHref: function (item, value) {
                    var href = $(item).attr("href") + value;
                    $(item).attr("href", href);
                }
            });

        });
        /*$.get("/users/newsCollections", {userId: userId}, function (data) {
            console.log(data);
            $(".products").renderValues({list: data}, {
                setHref: function (item, value) {
                    var href = $(item).attr("href") + value;
                    $(item).attr("href", href);
                }
            });

        });*/
    });
</script>
<body>
<div class="search-head">
    <div class="row nav-search">
        <div class="col">
            <a href="javascript:history.go(-1);">
                <span><i class="fa fa-chevron-left"></i></span>
            </a>
        </div>
        <div class="col">
            <span>游记收藏</span>
        </div>
        <div class="col"></div>
    </div>
</div>


<div class="container">
    <!--<h6 class="travels-title">游记收藏 </h6>-->
    <hr>
    <div class="travels">
        <div class="row" render-loop="list">
            <div class="col-6">
                <p>
                    <a href="/travelContent.html?id=" render-fun="setHref" render-key="list.id">
                        <img class="rounded-circle" render-src="list.coverUrl" width="80%">
                    </a>
                </p>
                <p render-html="list.title"></p>
            </div>
        </div>
    </div>
</div>
<!--<div class="container">
    <h6 class="products-title">资讯收藏 </h6>
    <hr>
    <div class="products">
        <div class="row" render-loop="list">
            <div class="col-6">
                <p>
                    <a href="/travelContent.html?id=" render-fun="setHref" render-key="list.id">
                        <img class="rounded-circle" render-src="list.coverUrl" width="80%">
                    </a>
                </p>
                <p render-html="list.title"></p>
            </div>
        </div>
    </div>
</div>-->

<div>


</div>


</body>
</html>